Conventional contrast correction is performed as a color correction for an original image with high quality regardless of whether the images are moving images or still images. Contrast correction is correction performed to make dark areas of an image darker and bright areas thereof brighter so as to emphasize image contrast, whereby a sharper image is obtained.
For such contrast correction, correction is typically performed by focusing on the maximum point and the minimum point of pixel values of the image (black and white areas), and in recent years, correction has been performed by using an S-curve in order to correct the image by emphasizing contrast and improving sharpness. With the correction using an S-curve, an area of the image to be made darker and an area thereof to be made brighter can be determined by adjusting the inflection point of the S-curve. For contrast correction using the S-curve, various technologies are disclosed for determining the inflection point in order to correct an image by emphasizing contrast and improving sharpness.
For example, Japanese Laid-open Patent Publication No. 2006-13863 discloses an image correction apparatus that detects the maximum value and the minimum value from each line constituting an input image and determines the inflection point of an S correction curve by using the intermediate value of these values, or determines the inflection point by determining the average intermediate value from the average of the maximum values of respective lines in a block and the average of the minimum values of the respective lines.
Furthermore, Japanese Laid-open Patent Publication No. 08-009197 discloses an image correction apparatus that uses a histogram of luminance signals of an input image corresponding to one screen and, if a white/black level range in the histogram is small, determines the inflection point of an S correction curve using the difference between the lowest frequency in the white/black level range and the reference frequency.
Moreover, Japanese Laid-open Patent Publication No. 07-38779 discloses an image correction apparatus for which a plurality of gamma correction curves is prepared, a correction curve is selected in accordance with the peak luminance of an input image, and the input image is then corrected using the selected correction curve.
The above-described conventional technologies have a problem in that an inflection point is not accurately determined because of the significant effect of noise and, as a result, the accuracy of the contrast correction can be reduced.
Specifically, in conventional technology, because the maximum value and the minimum value in an image or a line are detected so that an inflection point is determined by using the intermediate value of the maximum value and the minimum value, there is an effect of the maximum value or the minimum value (it can be noise) that is present on a small portion of the image or line; therefore, there is likely to be an effect of noise. Further, if there is a deviation of pixel values of an image (if the mode is different from the median), in correction according to the above-described technologies, a pixel for which the correction is not originally needed is corrected too much and an unnatural output image can be produced.
For example, although original images illustrated in FIGS. 14A and 14B are substantially the same, a local area of the original image illustrated in FIG. 14B is darker than the original image illustrated in FIG. 14A. If contrast correction is performed using a conventional method in the above case, because the inflection point of a correction curve is calculated from the feature value of the local point, the corrected images are considerably different from each other even though the original images are almost the same, and at least either one of them has low image quality and the contrast correction performance is not sufficient.